import request from "@/utils/request";
// 调用权限
export default {
  getList(data) {
    return request({
      url: "/api/application/",
      method: "get",
      params: data
    });
  },
  toAdd(data) {
    return request({
      url: "/api/application/",
      method: "post",
      data
    });
  },
  toDelete(id) {
    return request({
      url: "/api/application/" + id + "/",
      method: "delete"
    });
  },
  toEdit(id, data) {
    return request({
      url: "/api/application/" + id + "/",
      method: "put",
      data
    });
  },
  getDetail(id) {
    return request({
      url: "/api/application/" + id + "/",
      method: "get"
    });
  },
  toFixPhoto(id, data) {
    return request({
      url: "/api/application/" + id + "/fix_photo/",
      method: "put",
      data
    });
  },
  toCancel(id, data) {
    return request({
      url: "/api/application/" + id + "/cancel/",
      method: "put",
      data
    });
  },
  // 服务工单
  addCallBack(uuid,data){
    return request({
      url: "/api/application/"+ uuid +"/call_back/",
      method: "post",
      data
    });
  },
  editCallBack(uuid, id, data){
    return request({
      url: "/api/application/" + uuid + "/call_back/" + id + "/",
      method: "put",
      data
    });
  },
  delCallBack(uuid, id){
    return request({
      url: "/api/application/" + uuid + "/call_back/" + id + "/",
      method: "delete"
    });
  },
  getCallBack(uuid){
    return request({
      url: "/api/application/" + uuid + "/call_back/",
      method: "get"
    });
  }
};
